package com.qf.config;

import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MaxUploadSizeExceededException;

/**
 * @author TZL
 * @date 2020/8/8
 */
//异常解析器
@ControllerAdvice
public class ExResolver2004 {
    @ExceptionHandler({MaxUploadSizeExceededException.class})
    @ResponseBody
    public String ex1(){
        return "文件太大了~~";
    }
}
